<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>

<ul class="yhq-main clearfix">
	<c:forEach var="info" items="${list }">
	<li>
    	<div class="yhq-con <c:choose><c:when test="${info.state==1 && info.diffday>=0 }"></c:when><c:otherwise>yhq-past</c:otherwise></c:choose>">
            <div class="text-top">
                <div class="coupon-price fl">
                    ￥<span><fmt:formatNumber type="number"  value="${info.offer_money}"  pattern="0" /> </span>
                </div>
                <div class="coupon-msg fl">
                    <p class="msg-p1">${info.name}</p>
                    <p class="msg-p2">满${info.min_money}可使用</p>
                </div>
            </div>
            <div class="text-time">有效期：<fmt:formatDate value="${ info.startdate}" pattern="yyyy/MM/dd HH:mm"/>  -  <fmt:formatDate value="${ info.enddate}" pattern="yyyy/MM/dd HH:mm"/> </div>
            <c:if test="${info.state==2 }">
                <span class="coupons-have-used"></span>
            </c:if>
            <c:if test="${info.state==3 && info.diffday<0 }">
                <span class="coupons-state"></span>
            </c:if>

        </div>
    </li>
    </c:forEach>
</ul>
<c:if test="${list.size()==0 }">
<div class="nodata">没有相应优惠劵信息！</div>
</c:if>
<!-- 
<div class="yhq-inp">
 <div class="coupon-txt">
              <span>请输入优惠券编码</span> 
              <input type="text" name="couponcode" class="message" placeholder="请输入优惠券号">
              <a href="javascript:addCoupon();">添加</a>
</div>
</div>
 -->
<c:if test="${ pageCount >1}">
${pagehtml}
</c:if>